﻿Imports Control_Vuelos_BL
Imports Control_Vuelos_BE

Public Class frmLogin

    Private Sub cmdacp_Click(sender As System.Object, e As System.EventArgs) Handles cmdacp.Click
        If DxValidationProvider1.Validate() Then

            Dim oUsuario As New UsuarioBL
            Dim oUsuarioBE As New Usuario
            If oUsuario.pr_ValidarUsuario(Trim(gcodusr.EditValue), Trim(gpswusr.EditValue)) Then
                p_coduser = Trim(gcodusr.EditValue)
                oUsuarioBE = oUsuario.pr_Get_Usuario(gcodusr.EditValue)
                p_nomuser = oUsuarioBE.nomuser
                p_codnive = oUsuarioBE.codnive
                DialogResult = System.Windows.Forms.DialogResult.OK
            Else
                DialogResult = System.Windows.Forms.DialogResult.Cancel
            End If
        End If
    End Sub

    Private Sub cmdcan_Click(sender As System.Object, e As System.EventArgs) Handles cmdcan.Click
        DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub
End Class